export default [
    {
        path: '/login',
        name: 'Login',
        component: () => import('../views/Login'),
        meta: {
            FooterIsHidden: true
        }
    },
    {
        path: '/register',
        name: 'Register',
        component: () => import('../views/Register'),
        meta: {
            FooterIsHidden: true
        }
    },
    {
        path: '/detail/:skuId',
        name: 'Detail',
        component: () => import('@/views/Detail')
    },
    {
        path: '/addCartSuccess',
        name: 'AddCartSuccess',
        component: () => import('@/views/AddCartSuccess')
    },
    {
        path: '/shopCart',
        name: 'ShopCart',
        component: () => import('@/views/ShopCart')
    },
    {
        path: '/trade',
        name: 'Trade',
        component: () => import('@/views/Trade')
    },
    {
        path: "/pay",
        name: "Pay",
        component: () => import("@/views/Pay"),
    },
    {
        path: "/paySuccess",
        name: "PaySuccess",
        component: () => import("@/views/PaySuccess"),
    },
    {
        path: "/center",
        name: "Center",
        component: () => import("@/views/Center"),
        redirect: "/center/myOrder",
        children: [
            {
                path: "myOrder",
                name: "MyOrder",
                component: () => import("@/views/Center/components/MyOrder"),
            },
            {
                path: "teamOrder",
                name: "TeamOrder",
                component: () => import("@/views/Center/components/TeamOrder"),
            },
        ],
    },
    {
        path: '/home',
        name: 'Home',
        component: () => import('../views/Home')
    },
    {
        path: '/search/:keyword?',
        name: 'Search',
        component: () => import('../views/Search'),
        props(route) {
            return {
                ...route.query,
                ...route.params
            }
        }
    },
    {
        path: '/',
        redirect: '/home'
    },
    {
        path: '/*',
        component: () => import('../views/404')
    }
]